<extend name="Common/common2"/>
<block name="main">
    <div class="right-title">医生管理</div>
    <div class="right-content">
        <div class="adjsuttwo-title">
            <span class="creatapply click" id="add" onclick="location.href='{:U('add_doctor')}'">添加医生</span>
        </div>
        <p class="patinent_title">&nbsp;</p>
        <table border="0" class="patinet-content">
            <tr class="patient">
                <td>姓名</td>
                <td>评分</td>
                <td>诊所</td>
                <td>擅长</td>
                <td>操作</td>
            </tr>
            <volist name="list" id="vo">
                <tr class="patient nobg">
                    <td>{$vo.name}</td>
                    <td>{$vo.score}</td>
                    <td>{$clinic_name|mbSub=###,0,12}</td>
                    <td>{$vo.good|mbSub=###,0,15}</td>
                    <td>
                        <span class="patientdetail"  onclick="location.href='{:U('doctor_detail',array('id'=>$vo['id']))}'">详情</span>
                    <span class="patientdetails delete" data-id="{$vo.id}">删除</span>
                    </td>
                </tr>
            </volist>
        </table>
        <div class="page">{$pageHtml}</div>
    </div>
</block>
<block name="css"></block>
<block name="js">
    <script type="text/javascript" src="__STATIC__/common/js/func.js"></script>
    <script type="text/javascript">
        $(function(){
            var issend = false;
            //删除
            $('.delete').click(function () {
                if(issend) return false;
                issend = true;
                var id = $(this).data('id');
                $.post("{:U('delete_doctor')}",{id:id},function (data) {
                    if(data.code==0){
                        layer_success('删除成功',1500,function () {
                           location.href = data.url;
                        });
                    }else{
                        layer_error(data.msg);
                    }
                },'json')
            });
        });
    </script>
</block>